import request from "@/axios/request";

import url from "@/axios/url";
const { mesUrl, adminUrl } = url();

// 列表
export function list(params) {
  return request({
    url:mesUrl+ "/bsea/portal/common/listSharingPage",
    method: "get",
    params,
  });
}

// 新增
export function add(data) {
  return request({
    url: mesUrl+"/bsea/portal/common/createSharingPage",
    method: "post",
    data,
  });
}

// 编辑
export function edit(data) {
  return request({
    url: mesUrl+"/bsea/portal/common/editSharingPage",
    method: "post",
    data,
  });
}

// 删除
export function del(id) {
  return request({
    url: mesUrl+`/bsea/portal/common/deleteSharingPage/${id}`,
    method: "post",
  });
}

// 获取分享内容
export function getSharingPageValidType(uuid) {
  return request({
    url: mesUrl+`/bsea/portal/common/getSharingPageValidType/${uuid}`,
    method: "get",
  });
}

export function getSharingPage(params) {
  return request({
    url: mesUrl+"/bsea/portal/common/getSharingPage",
    method: "get",
    params,
  });
}



//物料批次模糊查询接口
export function listByBarcodeOrSn(params) {
  return request({
    url: mesUrl+"listByBarcodeOrSnmesFqcTaskDetail/listByBarcodeOrSn",
    method: "get",
    params,
  });
}
//查询下一级节点信息
export function queryNextNodes(params) {
  return request({
    url: adminUrl+"retrospect/queryNextNodes",
    method: "get",
    params,
  });
}
//查询指定节点的数据信息
export function queryNodeInfo(params) {
  return request({
    url: adminUrl+"retrospect/queryNodeInfo ",
    method: "get",
    params,
  });
}
